// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import * as names from 'names.js';

function main() {
    startApplication("keypadnavigation");
    type(waitForObject(names.scrollAreaLineEditQLineEdit), "<Tab>");
    type(waitForObject(names.scrollAreaHorizontalSliderQSlider), "<Tab>");
    type(waitForObject(names.scrollAreaDateEditQDateEdit), "<Tab>");
    type(waitForObject(names.scrollAreaDateEditQDateEdit), "<Tab>");
    type(waitForObject(names.scrollAreaDateEditQDateEdit), "<Tab>");
    type(waitForObject(names.scrollAreaComboBoxQComboBox), "<Tab>");
    type(waitForObject(names.scrollAreaPlainTextEditQPlainTextEdit), "<Tab>");
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaScrollAreaWidgetContentsQWidget), 175, 144, -40, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -44, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -44, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -42, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -39, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -36, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -36, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -27, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -17, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -14, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -13, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -6, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -8, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -5, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -5, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -2, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -1, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -2, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -4, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -5, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -4, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -5, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -5, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -6, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -5, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -6, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -8, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -10, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -9, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -13, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -10, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -14, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -16, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -17, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -16, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -17, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -16, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -14, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -16, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -19, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -24, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -25, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -32, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -32, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -31, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -32, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -27, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -24, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaQtSpinboxLineeditQLineEdit), 129, 3, -20, 0, 2);
    clickButton(waitForObject(names.scrollAreaPushButtonQPushButton));
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaPushButtonQPushButton), 154, 10, -31, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaPushButtonQPushButton), 154, 25, -31, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaGroupBoxQGroupBox), 154, 9, -33, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaGroupBoxQGroupBox), 154, 25, -32, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBoxRadioButtonQRadioButton), 140, 6, -31, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBoxRadioButtonQRadioButton), 140, 22, -31, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBoxRadioButton2QRadioButton), 140, 8, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaGroupBoxQGroupBox), 154, 87, -31, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaScrollAreaWidgetContentsQWidget), 165, 486, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaGroupBox2QGroupBox), 154, 9, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.scrollAreaGroupBox2QGroupBox), 154, 23, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 2, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 16, -33, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -27, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -25, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -24, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -20, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -20, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -28, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -29, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -24, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -24, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -21, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -23, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -20, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -19, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -17, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -14, 0, 2);
    sendEvent("QWheelEvent", waitForObject(names.groupBox2CheckBoxQCheckBox), 140, 21, -14, 0, 2);
    type(waitForObject(names.scrollAreaPushButtonQPushButton), "<Tab>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
    type(waitForObject(names.groupBoxRadioButtonQRadioButton), "<Down>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, true);
    type(waitForObject(names.groupBoxRadioButton2QRadioButton), "<Up>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
    type(waitForObject(names.groupBoxRadioButtonQRadioButton), "<Down>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, true);
    type(waitForObject(names.groupBoxRadioButton2QRadioButton), "<Up>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
    type(waitForObject(names.groupBoxRadioButtonQRadioButton), "<Right>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
    type(waitForObject(names.groupBoxRadioButtonQRadioButton), "<Left>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
    type(waitForObject(names.groupBoxRadioButtonQRadioButton), "<Right>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
    type(waitForObject(names.groupBoxRadioButtonQRadioButton), "<Left>");
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButtonQRadioButton).focus, true);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).checked, false);
    test.compare(waitForObjectExists(names.groupBoxRadioButton2QRadioButton).focus, false);
}
